﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _2_5
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            string input = txtNumber.Text.Trim();
            string day;

            switch (input)
            {
                case "1":
                    day = "Monday";
                    break;
                case "2":
                    day = "Tuesday";
                    break;
                case "3":
                    day = "Wednesday";
                    break;
                case "4":
                    day = "Thursday";
                    break;
                case "5":
                    day = "Friday";
                    break;
                case "6":
                    day = "Saturday";
                    break;
                case "7":
                    day = "Sunday";
                    break;
                default:
                    MessageBox.Show("请输入数字1-7！");
                    txtNumber.Focus();
                    return;
            }

            txtDay.Text = day;
        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            txtNumber.Text = "";
            txtDay.Text = "";
            txtNumber.Focus();
        }
    }
}
